<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBlogRolePermissionTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     * 角色权限关联表
     */
    public function up()
    {
        Schema::create('blog_role_permission', function (Blueprint $table) {
            $table->integer('role_id')->comment('角色表在关联表中的外键');
            $table->integer('permission_id')->comment('权限表在关联表中的外键	');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('blog_role_permission');
    }
}
